<?php
function check_loginok(){
    session_start(); 
    if (isset($_SESSION['authorized_s']) && $_SESSION['authorized_s'] === true && time() < $_SESSION['expires_at_s']) {
    } else {   
        session_write_close();
        echo "<script>alert('当前你还未登录'); window.location.href = './?juslr';</script>";  
    } 
    }
check_loginok();
?>
